package com.wanxi.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Li
 * @Date 2023/4/27 10:03
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ApiModel(value = "导航",description = "描述导航对象")
@TableName("navs")
public class NavModel {
    @TableId(value = "id", type = IdType.ASSIGN_ID)//雪花算法
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "导航id",example = "1678241245842968578")
    private Long id;
    @ApiModelProperty(value = "导航名称",example = "网站首页")
    private String navName;
    @ApiModelProperty(value = "导航地址",example = "/xx.html")
    private String navHref;
    @ApiModelProperty(value = "创建时间",example = "2023-05-19 11:19:07")
    private String createTime;
    @ApiModelProperty(value = "修改时间",example = "2023-05-20 11:19:07")
    private String updateTime;
    @ApiModelProperty(value = "状态",example = "1")
    private Integer enable;
    @ApiModelProperty(value = "备注",example = "首页导航栏")
    private String remark;

    @ApiModelProperty(value = "页数",example = "1")
    @TableField(exist = false)
    private Integer page;
    @ApiModelProperty(value = "每页条数",example = "10")
    @TableField(exist = false)
    private Integer limit;

}
